﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="timely.aspx.cs" Inherits="WorkOrder.workBill.timely" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>售中及时率管理_工单管理支持系统</title>
    <link href="../css/left.css" type="text/css" rel="STYLESHEET" />
    <link href="../css/site2.css" type="text/css" rel="STYLESHEET" />
    <style type="text/css">
        ul
        {
            font-size: 12px;
            margin: 0px; /*ff和ie下表现有差异*/
            padding: 0px 0px 27px 10px; /*27为图片的高度*/
            _padding: 0px 0px 26px 10px; /* ie6 26为图片的高度*/
            list-style: none;
            border-bottom: 1px solid #4F80C8;
        }
        * + html ul
        {
            padding: 0px 0px 26px 10px;
        }
        /* IE7 */
        ul li
        {
            display: inline;
        }
        ul a
        {
            float: left;
            background: url("../images/tabLeft.jpg") no-repeat left top;
            margin-right: 3px;
            padding-left: 7px; /*此值为左边图片的宽度*/
            color: #000000;
            text-align: center;
            text-decoration: none;
        }
        /*ul a{
color:#999999;
}*/
        ul a span
        {
            display: block;
            background: url("../images/tabRight.jpg") no-repeat right top;
            padding: 9px 12px 3px 7px;
        }
        ul #curr a
        {
            background: url("../images/tab2Left.jpg");
            border-bottom: 1px solid #FFFFFF;
        }
        ul #curr a span
        {
            background: url("../images/tab2Right.jpg") no-repeat right top;
        }
        
        a
        {
            blr: expression(this.onFocus=this.blur());
            outline: none;
        }
    </style>
    <script language="javascript" type="text/javascript">        //加在head中，PNG无灰色背景
        var tmp = window.navigator.userAgent.toLowerCase().indexOf("MSIE");
        //加在head中，PNG无灰色背景
        function correctPNG() {
            for (var i = 0; i < document.images.length; i++) {
                var img = document.images[i];
                var imgName = img.src.toUpperCase();
                if (imgName.substring(imgName.length - 3, imgName.length) == "PNG") {
                    var imgID = (img.id) ? "id='" + img.id + "' " : "";
                    var imgClass = (img.className) ? "class='" + img.className + "' " : "";
                    var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
                    var imgStyle = "display:inline-block;" + img.style.cssText;
                    if (img.align == "left") imgStyle = "float:left;" + imgStyle;
                    if (img.align == "right") imgStyle = "float:right;" + imgStyle;
                    if (tmp >= 1) {
                        if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle;
                    }
                    else {
                        if (img.parentNode.href) imgStyle = "cursor:hand;" + imgStyle;
                    }
                    var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
       + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>";
                    img.outerHTML = strNewHTML;

                }
            }
        }

        if (window.addEventListener) {
            window.addEventListener('DOMContentLoaded', correctPNG, false);   //firefox
            window.addEventListener('load', correctPNG, false);
        } else if (window.attachEvent) {
            window.attachEvent('onload', correctPNG);  //IE
        }
    </script>
</head>
<body style="margin: 0 0 0 0; background-color: #fff; border-left: solid 1px #54a6e2;">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="LinkButtonA">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonB">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonE">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonF">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonG">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonH">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="LinkButtonI">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="Panel1" UpdatePanelHeight="" 
                        LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik"
        BackgroundPosition="TopLeft">
    </telerik:RadAjaxLoadingPanel>
    <div style="height: 3px;">
    </div>
    <div id="container1">
        <ul>
            <li id="curr"><a href="timely.aspx"><span>当前售中及时率</span></a></li>
            <li><a href="timelySearch.aspx"><span>售中在线工单查询</span></a></li>
            <li><a href="taskreport.aspx"><span>已完成工单售中及时率</span></a></li>
            <li><a href="fihishedTimelyQuery.aspx"><span>已完成工单查询</span></a></li>
        </ul>
        <div id="container1_1">
            <table width="100%" border="0">
                <tr>
                    <td>
                        <div style="border: solid 1px #9fd6ff; background-color: #f0f8ff">
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 10px;">
                                    </td>
                                    <td>
                                        <table>
                                            <tr>
                                                <td>
                                                    <div id="divTitle" runat="server" style="font-size: 14px;">
                                                        截止今天本月完成工单&nbsp;<strong><asp:LinkButton ID="LinkButtonA" runat="server" Font-Size="16px"
                                                            OnClick="LinkButtonA_Click">A</asp:LinkButton></strong>&nbsp;张，其中超时&nbsp;<strong><asp:LinkButton
                                                                ID="LinkButtonB" runat="server" Font-Size="16px" ForeColor="Red" OnClick="LinkButtonB_Click">B</asp:LinkButton></strong>&nbsp;张，开通及时率&nbsp;<strong><asp:Label
                                                                    ID="lblC" runat="server" Text="C"></asp:Label>&nbsp;%</strong>&nbsp;，在线工单&nbsp;<strong><asp:Label
                                                                        ID="lblD" runat="server" Text="D"></asp:Label></strong>&nbsp;张，售中环节在线工单&nbsp;<strong><asp:LinkButton
                                                                            ID="LinkButtonE" runat="server" Font-Size="16px" OnClick="LinkButtonE_Click">E</asp:LinkButton></strong>&nbsp;张，其中超时&nbsp;<strong><asp:LinkButton
                                                                                ID="LinkButtonF" runat="server" Font-Size="16px" ForeColor="Red" OnClick="LinkButtonF_Click">F</asp:LinkButton></strong>&nbsp;张，专线售中环节在线超30工作日&nbsp;<strong><asp:LinkButton
                                                                                    ID="LinkButtonG" runat="server" Font-Size="16px" ForeColor="Red" OnClick="LinkButtonG_Click">G</asp:LinkButton></strong>&nbsp;张，非专线售中环节在线超5工作日&nbsp;<strong><asp:LinkButton
                                                                                        ID="LinkButtonH" runat="server" Font-Size="16px" ForeColor="Red" OnClick="LinkButtonH_Click">H</asp:LinkButton></strong>&nbsp;张，无工程专线售中环节在线超10工作日&nbsp;<strong><asp:LinkButton
                                                                                            ID="LinkButtonI" runat="server" Font-Size="16px" ForeColor="Red" OnClick="LinkButtonI_Click">I</asp:LinkButton></strong>&nbsp;张。</div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
            <table style="width: 100%">
                <tr>
                    <td>
                        <div style="border: solid 1px #9fd6ff; background-color: #d4f1f9; border-bottom: none;">
                            <table style="width: 100%; font-family: Arial">
                                <tr>
                                    <td style="height: 20px;">
                                        &nbsp;&nbsp;<img alt="" align="absmiddle" src="../images/181.gif" />&nbsp; <strong>工单列表</strong>
                                    </td>
                                    <td style="width: 120px; text-align: right;">
                                        <asp:ImageButton ID="ImageButton1" runat="server" ImageAlign="Middle" ImageUrl="../images/action_save.gif"
                                            OnClick="ImageButton1_Click" />
                                        <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">导出到excel文件</asp:LinkButton>
                                    </td>
                                </tr>
                            </table>
                        </div>
                        <div id="divgv" style="border: solid 1px #9fd6ff; background-color: #f0f8ff;">
                            <table width="100%">
                                <tr>
                                    <td style="width: 10px;">
                                    </td>
                                    <td>
                                        <div id="gv" style="border: solid 1px #9fd6ff; overflow: scroll; width: 100%; height: 100%">
                                            <asp:Panel ID="Panel1" runat="server">
                                                <asp:GridView ID="GridView1" runat="server" Width="1900px" CssClass="Table" OnRowDataBound="gvReport_RowDataBound"
                                                    AutoGenerateColumns="False" EnableModelValidation="True">
                                                    <HeaderStyle CssClass="gridtitle" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="工单号" SortExpression="工单号">
                                                            <ItemStyle HorizontalAlign="Left" Width="220px" />
                                                            <ItemTemplate>
                                                                <a href="#" title="点击查看工单详细信息" onclick="window.open('./showOrder.aspx?id=<%# Eval("order_id") %>','','location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,width=1050,height=600');">
                                                                    <%# Eval("工单号")%></a>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="工单主题" SortExpression="工单主题">
                                                            <ItemStyle HorizontalAlign="Left" />
                                                            <ItemTemplate>
                                                                <a href="#" title='<%# Eval("工单主题")%>' onclick="window.open('./showOrder.aspx?id=<%# Eval("order_id") %>','','location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,width=1050,height=600');">
                                                                    <%# Eval("工单主题")%></a>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="工单状态" HeaderText="工单状态" SortExpression="工单状态">
                                                            <ItemStyle HorizontalAlign="Left" Width="150px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="是否超时" HeaderText="是否超时" SortExpression="是否超时">
                                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="超时时间" HeaderText="超时时间" SortExpression="超时时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="距离超时时间" HeaderText="距离超时时间" SortExpression="距离超时时间">
                                                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="工单历时" HeaderText="工单历时" SortExpression="工单历时">
                                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="售中在线历时" HeaderText="售中在线历时" SortExpression="售中在线历时">
                                                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="派单时间" HeaderText="派单时间" SortExpression="派单时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="CRM资源确认时间" HeaderText="CRM资源确认时间" SortExpression="CRM资源确认时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="130px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="产品类型" HeaderText="产品类型" SortExpression="产品类型">
                                                            <ItemStyle HorizontalAlign="Left" Width="70px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="业务类型" HeaderText="业务类型" SortExpression="业务类型">
                                                            <ItemStyle HorizontalAlign="Left" Width="60px" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                </asp:GridView>
                                                <asp:GridView ID="GridView2" runat="server" Width="1600px" CssClass="Table" OnRowDataBound="gvReport2_RowDataBound"
                                                    AutoGenerateColumns="False" EnableModelValidation="True">
                                                    <HeaderStyle CssClass="gridtitle" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="工单号" SortExpression="工单号">
                                                            <ItemStyle HorizontalAlign="Left" Width="220px" />
                                                            <ItemTemplate>
                                                                <a href="#" title="点击查看工单详细信息" onclick="window.open('./showOrder.aspx?id=<%# Eval("order_id") %>','','location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,width=1050,height=600');">
                                                                    <%# Eval("工单号")%></a>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="工单主题" SortExpression="工单主题">
                                                            <ItemStyle HorizontalAlign="Left" />
                                                            <ItemTemplate>
                                                                <a href="#" title='<%# Eval("工单主题")%>' onclick="window.open('./showOrder.aspx?id=<%# Eval("order_id") %>','','location=no,menubar=no,status=no,toolbar=no,resizable=yes,scrollbars=yes,width=1050,height=600');">
                                                                    <%# Eval("工单主题")%></a>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField DataField="是否超时" HeaderText="是否超时" SortExpression="是否超时">
                                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="超时时间" HeaderText="超时时间" SortExpression="超时时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="超时天数" HeaderText="超时天数" SortExpression="超时天数">
                                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="工单历时" HeaderText="工单历时" SortExpression="工单历时">
                                                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="售中在线历时" HeaderText="售中在线历时" SortExpression="售中在线历时">
                                                            <ItemStyle HorizontalAlign="Center" Width="80px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="派单时间" HeaderText="派单时间" SortExpression="派单时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="完成时间" HeaderText="完成时间" SortExpression="完成时间">
                                                            <ItemStyle HorizontalAlign="Left" Width="120px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="产品类型" HeaderText="产品类型" SortExpression="产品类型">
                                                            <ItemStyle HorizontalAlign="Left" Width="70px" />
                                                        </asp:BoundField>
                                                        <asp:BoundField DataField="业务类型" HeaderText="业务类型" SortExpression="业务类型">
                                                            <ItemStyle HorizontalAlign="Left" Width="60px" />
                                                        </asp:BoundField>
                                                    </Columns>
                                                </asp:GridView>
                                            </asp:Panel>
                                        </div>
                                        <script type="text/javascript">
                                            document.getElementById("gv").style.width = document.documentElement.clientWidth - 50;
                                            document.getElementById("gv").style.height = document.documentElement.clientHeight - 150;
                                        </script>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    </form>
</body>
</html>
